package cn.jtfadmin.activiti.domain.dto;

import cn.jtfadmin.base.lang.enums.BooleanEnum;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * 历史流程实例
 * @author jtf
 * @since 0.0.2
 */
@Data
public class HistoryProcessInstanceDTO implements Serializable {

    /**
     * id
     */
    protected String id;

    /**
     * 业务key
     */
    protected String businessKey;
    /**
     * 流程定义id
     */
    protected String processDefinitionId;

    /**
     * 流程定义名称
     */
    protected String processDefinitionName;

    /**
     * 流程定义 key
     */
    protected String processDefinitionKey;



    /**
     * 部署id
     */
    protected String deploymentId;


    /**
     * 启动时间
     */
    protected Date startTime;


    /**
     * 结束时间
     */
    protected Date endTime;

    /**
     * 进行时长
     */
    protected Long durationInMillis;

    /**
     * 流程结束活动id
     */
    protected String endActivityId;


    /**
     * 启动人
     */
    protected String startUserId;

    /**
     * 流程启动活动id
     */
    protected String startActivityId;


    /**
     * 删除原因
     */
    protected String deleteReason;


    /**
     * 上级流程实例id
     */
    protected String superProcessInstanceId;


    /**
     * 租户id
     */
    protected String tenantId;
    /**
     * 流程实例名称
     */
    protected String name;

    /**
     * 流程描述
     */
    protected String description;


    /**
     * 流程变量
     */
    protected Map<String, Object> processVaribles;






    public HistoryProcessInstanceDTO() {
    }

    public HistoryProcessInstanceDTO(String id, String businessKey, String processDefinitionId, String processDefinitionName, String processDefinitionKey, String deploymentId, Date startTime, Date endTime, Long durationInMillis, String endActivityId, String startUserId, String startActivityId, String deleteReason, String superProcessInstanceId, String tenantId, String name, String description, Map<String, Object> processVaribles) {
        this.id = id;
        this.businessKey = businessKey;
        this.processDefinitionId = processDefinitionId;
        this.processDefinitionName = processDefinitionName;
        this.processDefinitionKey = processDefinitionKey;
        this.deploymentId = deploymentId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.durationInMillis = durationInMillis;
        this.endActivityId = endActivityId;
        this.startUserId = startUserId;
        this.startActivityId = startActivityId;
        this.deleteReason = deleteReason;
        this.superProcessInstanceId = superProcessInstanceId;
        this.tenantId = tenantId;
        this.name = name;
        this.description = description;
        this.processVaribles = processVaribles;
    }
}
